package com.javabi.htmlbuilder.css.font;

import com.javabi.htmlbuilder.css.CSSBuilder;
import com.javabi.htmlbuilder.css.CSSDeclaration;
import com.javabi.htmlbuilder.css.CSSPropertyName;

/**
 * A CSS Font Weight.
 */
public enum FontWeight implements CSSDeclaration {

	/** font-weight: normal */
	NORMAL("normal"),
	/** font-weight: bold */
	BOLD("bold"),
	/** font-weight: bolder */
	BOLDER("bolder"),
	/** font-weight: lighter */
	LIGHTER("lighter");

	/** The value. */
	private final String value;

	/**
	 * Creates a new declaration.
	 * @param value the value.
	 */
	private FontWeight(String value) {
		this.value = value;
	}

	/**
	 * Returns the value.
	 * @return the value.
	 */
	public String getValue() {
		return value;
	}

	/**
	 * Returns the property.
	 * @return the property.
	 */
	public CSSPropertyName getPropertyName() {
		return CSSPropertyName.FONT_WEIGHT;
	}

	/**
	 * Append this to the given css builder.
	 * @param css the css builder.
	 * @return the css builder.
	 */
	public CSSBuilder appendTo(CSSBuilder css) {
		return css.property(getPropertyName(), getValue());
	}

}
